package org.example.backend.repository;

import org.example.backend.entity.Ticket;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.time.LocalDate;
import java.util.List;

public interface TicketRepository extends JpaRepository<Ticket, Long> {
    List<Ticket> findByValidDateGreaterThanEqual(LocalDate date);
    List<Ticket> findByTicketType(String ticketType);
    Page<Ticket> findByIsActive(Boolean isActive, Pageable pageable);
    List<Ticket> findByName(String name);
} 